/* 
 * File:   main.cpp
 * Author: mvdr
 *
 * Created on March 19, 2013, 2:55 PM
 */

#include <cstdlib>
#include <iostream>
#include "Model.h"
#include "Game.h"
#include <cstring>


using namespace std;

/*
 * 
 */
int main(int argc, char** argv) {

    if (argc < 2)
    {
        cout << "Please specify the number of games\n";
        return 0;
    } 
    
    bool magic = false;
    if (arguments.count("-m") == 1 || arguments.count("--magic") == 1)
        magic = true;
    
    string filename = "no-magic";
    
    bool verbose = false;    
    
    if (arguments.count("-v") == 1 || arguments.count("--verbose") == 1)
        verbose = true;
    
    for (int i = 0; i != atoi(argv[1]); ++i)
    {
        cout << "Game " << i << ": ";
        game.run();
    }
    else
    	cout << "No epistemagic\n";
    
    time_t now = time(0);
    tm *ltm = localtime(&now);    
    
    stringstream ss;
    ss << "results/" << filename << '_' << prettyString(ltm->tm_mday, 2)
            << '-' << prettyString(ltm->tm_mon + 1, 2)
            << '_' << prettyString(ltm->tm_hour, 2)
            << ':' << prettyString(ltm->tm_min, 2) << ".csv";
    
    filename = ss.str();
    
    if (verbose)
        cout << "So you want verbosity, \'eh?\n";
    
    Game game(magic, verbose);
    int runs = min(atoi(argv[1]), game.nStates());
    
}

